package com.example.team.service.Imp;

import com.example.team.dao.ILeavesDao;
import com.example.team.entity.Leaves;
import com.example.team.service.ILeavesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/****
 * 编写者:王轩
 * 时间:2023/10/30
 * 请假信息管理
 */
@Service
public class ILeavesServiceImpl implements ILeavesService {
    @Autowired
    private ILeavesDao leavesDao;
    //添加方法
    @Override
    public int insertLeaves(Leaves leaves) {
        return leavesDao.insertLeaves(leaves);
    }
    //删除方法
    @Override
    public int deleteLeaves(Leaves leaves) {
        return leavesDao.deleteLeaves(leaves);
    }
    //更改方法
    @Override
    public int updateLeaves(Leaves leaves) {
        return leavesDao.updateLeaves(leaves);
    }
    //查询所有
    @Override
    public List<Leaves> getAllLeaves(Leaves leaves) {
        return leavesDao.getAllLeaves(leaves);
    }
    //单条件查询
    @Override
    public Leaves getLeaves(Leaves leaves) {
        return leavesDao.getLeaves(leaves);
    }

    @Override
    public int insterApprover(Leaves leaves) {
        return leavesDao.insterApprover(leaves);
    }
}
